import request from "@/utils/request";
const BASE_URL = "/pms/projects";
const GRANT_BASE_URL = '/pms/project';
export function queryRsr(projectId) {
    return request({
        url: BASE_URL + '/' + projectId + '/rsr',
        method: 'get'
    })
}

// 查询资源授权用户ID列表
export function queryGrant(query) {
    return request({
        url: GRANT_BASE_URL + '/' + 'grant',
        method: 'get',
        params: query
    })
}


// 新增授权
export function createGrant(params) {
    return request({
        url: GRANT_BASE_URL + '/' + 'grant',
        method: 'post',
        data: params
    })
}

// 取消授权
export function cancelGrant(params) {
    return request({
        url: GRANT_BASE_URL + '/' + 'ungrant',
        method: 'post',
        data: params
    })
}